import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    timed: '00:00:00',
    judge: 0
  },
  actions: {
    changeTime (ctx, item) {
      ctx.commit('changeTime', item)
    }
  },
  mutations: {
    changeTime (state, item) {
      console.log(item.timed, item.judge, 'juuu')
      state.timed = item.timed
      state.judge = item.judge
    }
  }
})
